Subject: CVS commit: syssrc/sys
To: None <source-changes@netbsd.org>
From: Chuck Silvers <chs@netbsd.org>
List: source-changes
Date: 09/15/2001 23:36:48
Module Name: syssrc
Committed By: chs
Date: Sat Sep 15 20:36:48 UTC 2001
Modified Files:
syssrc/sys/adosfs: adosfs.h advfsops.c advnops.c
syssrc/sys/arch/alpha/alpha: pmap.c
syssrc/sys/arch/arm/arm32: pmap.c
syssrc/sys/arch/i386/i386: pmap.c
syssrc/sys/arch/pc532/pc532: pmap.c
syssrc/sys/arch/sh3/sh3: pmap.c
syssrc/sys/arch/sun2/sun2: pmap.c
syssrc/sys/arch/x86_64/x86_64: pmap.c
syssrc/sys/conf: files
syssrc/sys/dev/pci: twe.c
syssrc/sys/filecorefs: filecore_node.h filecore_vfsops.c
filecore_vnops.c
syssrc/sys/isofs/cd9660: cd9660_node.h cd9660_vfsops.c cd9660_vnops.c
syssrc/sys/kern: kern_malloc.c kern_malloc_debug.c kern_physio.c
uipc_mbuf.c vfs_subr.c vfs_vnops.c vnode_if.src
syssrc/sys/miscfs/genfs: Makefile genfs.h genfs_vnops.c
syssrc/sys/miscfs/specfs: spec_vnops.c
syssrc/sys/miscfs/syncfs: sync_subr.c
syssrc/sys/miscfs/union: union_vnops.c
syssrc/sys/msdosfs: denode.h msdosfs_denode.c msdosfs_vfsops.c
msdosfs_vnops.c
syssrc/sys/nfs: nfs_bio.c nfs_node.c nfs_subs.c nfs_vfsops.c
nfs_vnops.c nfsnode.h
syssrc/sys/sys: buf.h param.h vnode.h
syssrc/sys/ufs/ext2fs: ext2fs_balloc.c ext2fs_extern.h
ext2fs_readwrite.c ext2fs_vfsops.c ext2fs_vnops.c
syssrc/sys/ufs/ffs: ffs_alloc.c ffs_balloc.c ffs_extern.h ffs_inode.c
ffs_softdep.c ffs_vfsops.c ffs_vnops.c
syssrc/sys/ufs/lfs: lfs_alloc.c lfs_inode.c lfs_syscalls.c lfs_vfsops.c
lfs_vnops.c
syssrc/sys/ufs/ufs: inode.h ufs_extern.h ufs_inode.c ufs_readwrite.c
ufs_vnops.c
syssrc/sys/uvm: Makefile uvm.h uvm_amap.c uvm_anon.c uvm_aobj.c
uvm_aobj.h uvm_bio.c uvm_device.c uvm_extern.h uvm_fault.c
uvm_fault_i.h uvm_glue.c uvm_io.c uvm_km.c uvm_km.h uvm_loan.c
uvm_map.c uvm_mmap.c uvm_object.h uvm_page.c uvm_page.h
uvm_page_i.h uvm_pager.c uvm_pager.h uvm_pdaemon.c uvm_pglist.c
uvm_stat.c uvm_swap.c uvm_vnode.c
Removed Files:
syssrc/sys/kern: vfs_cluster.c
syssrc/sys/uvm: uvm_vnode.h
Log Message:
a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps. this is
required now, since I've removed the globals that expose the address range.
pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
no longer any need to special-case it.
- eliminate struct uvm_vnode by moving its fields into struct vnode.
- rewrite the pageout path. the pager is now responsible for handling the
high-level requests instead of only getting control after a bunch of work
has already been done on its behalf. this will allow us to UBCify LFS,
which needs tighter control over its pages than other filesystems do.
writing a page to disk no longer requires making it read-only, which
allows us to write wired pages without causing all kinds of havoc.
- use a new PG_PAGEOUT flag to indicate that a page should be freed
on behalf of the pagedaemon when it's unlocked. this flag is very similar
to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
pageout fails due to eg. an indirect-block buffer being locked.
this allows us to remove the "version" field from struct vm_page,
and together with shrinking "loan_count" from 32 bits to 16,
struct vm_page is now 4 bytes smaller.
- no longer use PG_RELEASED for swap-backed pages. if the page is busy
because it's being paged out, we can't release the swap slot to be
reallocated until that write is complete, but unlike with vnodes we
don't keep a count of in-progress writes so there's no good way to
know when the write is done. instead, when we need to free a busy
swap-backed page, just sleep until we can get it busy ourselves.
- implement a fast-path for extending writes which allows us to avoid
zeroing new pages. this substantially reduces cpu usage.
- encapsulate the data used by the genfs code in a struct genfs_node,
which must be the first element of the filesystem-specific vnode data
for filesystems which use genfs_{get,put}pages().
- eliminate many of the UVM pagerops, since they aren't needed anymore
now that the pager "put" operation is a higher-level operation.
- enhance the genfs code to allow NFS to use the genfs_{get,put}pages
instead of a modified copy.
- clean up struct vnode by removing all the fields that used to be used by
the vfs_cluster.c code (which we don't use anymore with UBC).
- remove kmem_object and mb_object since they were useless.
instead of allocating pages to these objects, we now just allocate
pages with no object. such pages are mapped in the kernel until they
are freed, so we can use the mapping to find the page to free it.
this allows us to remove splvm() protection in several places.
The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
To generate a diff of this commit:
cvs rdiff -r1.17 -r1.18 syssrc/sys/adosfs/adosfs.h
cvs rdiff -r1.47 -r1.48 syssrc/sys/adosfs/advfsops.c
cvs rdiff -r1.60 -r1.61 syssrc/sys/adosfs/advnops.c
cvs rdiff -r1.187 -r1.188 syssrc/sys/arch/alpha/alpha/pmap.c
cvs rdiff -r1.22 -r1.23 syssrc/sys/arch/arm/arm32/pmap.c
cvs rdiff -r1.129 -r1.130 syssrc/sys/arch/i386/i386/pmap.c
cvs rdiff -r1.64 -r1.65 syssrc/sys/arch/pc532/pc532/pmap.c
cvs rdiff -r1.26 -r1.27 syssrc/sys/arch/sh3/sh3/pmap.c
cvs rdiff -r1.14 -r1.15 syssrc/sys/arch/sun2/sun2/pmap.c
cvs rdiff -r1.2 -r1.3 syssrc/sys/arch/x86_64/x86_64/pmap.c
cvs rdiff -r1.459 -r1.460 syssrc/sys/conf/files
cvs rdiff -r1.16 -r1.17 syssrc/sys/dev/pci/twe.c
cvs rdiff -r1.5 -r1.6 syssrc/sys/filecorefs/filecore_node.h
cvs rdiff -r1.15 -r1.16 syssrc/sys/filecorefs/filecore_vfsops.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/filecorefs/filecore_vnops.c
cvs rdiff -r1.21 -r1.22 syssrc/sys/isofs/cd9660/cd9660_node.h
cvs rdiff -r1.57 -r1.58 syssrc/sys/isofs/cd9660/cd9660_vfsops.c
cvs rdiff -r1.66 -r1.67 syssrc/sys/isofs/cd9660/cd9660_vnops.c
cvs rdiff -r1.62 -r1.63 syssrc/sys/kern/kern_malloc.c
cvs rdiff -r1.1 -r1.2 syssrc/sys/kern/kern_malloc_debug.c
cvs rdiff -r1.49 -r1.50 syssrc/sys/kern/kern_physio.c
cvs rdiff -r1.53 -r1.54 syssrc/sys/kern/uipc_mbuf.c
cvs rdiff -r1.26 -r0 syssrc/sys/kern/vfs_cluster.c
cvs rdiff -r1.157 -r1.158 syssrc/sys/kern/vfs_subr.c
cvs rdiff -r1.48 -r1.49 syssrc/sys/kern/vfs_vnops.c
cvs rdiff -r1.29 -r1.30 syssrc/sys/kern/vnode_if.src
cvs rdiff -r1.2 -r1.3 syssrc/sys/miscfs/genfs/Makefile
cvs rdiff -r1.12 -r1.13 syssrc/sys/miscfs/genfs/genfs.h
cvs rdiff -r1.36 -r1.37 syssrc/sys/miscfs/genfs/genfs_vnops.c
cvs rdiff -r1.56 -r1.57 syssrc/sys/miscfs/specfs/spec_vnops.c
cvs rdiff -r1.8 -r1.9 syssrc/sys/miscfs/syncfs/sync_subr.c
cvs rdiff -r1.54 -r1.55 syssrc/sys/miscfs/union/union_vnops.c
cvs rdiff -r1.33 -r1.34 syssrc/sys/msdosfs/denode.h
cvs rdiff -r1.51 -r1.52 syssrc/sys/msdosfs/msdosfs_denode.c
cvs rdiff -r1.75 -r1.76 syssrc/sys/msdosfs/msdosfs_vfsops.c
cvs rdiff -r1.111 -r1.112 syssrc/sys/msdosfs/msdosfs_vnops.c
cvs rdiff -r1.68 -r1.69 syssrc/sys/nfs/nfs_bio.c
cvs rdiff -r1.45 -r1.46 syssrc/sys/nfs/nfs_node.c
cvs rdiff -r1.96 -r1.97 syssrc/sys/nfs/nfs_subs.c
cvs rdiff -r1.107 -r1.108 syssrc/sys/nfs/nfs_vfsops.c
cvs rdiff -r1.137 -r1.138 syssrc/sys/nfs/nfs_vnops.c
cvs rdiff -r1.33 -r1.34 syssrc/sys/nfs/nfsnode.h
cvs rdiff -r1.47 -r1.48 syssrc/sys/sys/buf.h
cvs rdiff -r1.129 -r1.130 syssrc/sys/sys/param.h
cvs rdiff -r1.91 -r1.92 syssrc/sys/sys/vnode.h
cvs rdiff -r1.10 -r1.11 syssrc/sys/ufs/ext2fs/ext2fs_balloc.c \
syssrc/sys/ufs/ext2fs/ext2fs_extern.h
cvs rdiff -r1.16 -r1.17 syssrc/sys/ufs/ext2fs/ext2fs_readwrite.c
cvs rdiff -r1.44 -r1.45 syssrc/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -r1.36 -r1.37 syssrc/sys/ufs/ext2fs/ext2fs_vnops.c
cvs rdiff -r1.50 -r1.51 syssrc/sys/ufs/ffs/ffs_alloc.c
cvs rdiff -r1.25 -r1.26 syssrc/sys/ufs/ffs/ffs_balloc.c
cvs rdiff -r1.20 -r1.21 syssrc/sys/ufs/ffs/ffs_extern.h
cvs rdiff -r1.42 -r1.43 syssrc/sys/ufs/ffs/ffs_inode.c
cvs rdiff -r1.16 -r1.17 syssrc/sys/ufs/ffs/ffs_softdep.c
cvs rdiff -r1.86 -r1.87 syssrc/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -r1.38 -r1.39 syssrc/sys/ufs/ffs/ffs_vnops.c
cvs rdiff -r1.48 -r1.49 syssrc/sys/ufs/lfs/lfs_alloc.c
cvs rdiff -r1.52 -r1.53 syssrc/sys/ufs/lfs/lfs_inode.c
cvs rdiff -r1.58 -r1.59 syssrc/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -r1.67 -r1.68 syssrc/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -r1.54 -r1.55 syssrc/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -r1.24 -r1.25 syssrc/sys/ufs/ufs/inode.h \
syssrc/sys/ufs/ufs/ufs_inode.c
cvs rdiff -r1.26 -r1.27 syssrc/sys/ufs/ufs/ufs_extern.h
cvs rdiff -r1.32 -r1.33 syssrc/sys/ufs/ufs/ufs_readwrite.c
cvs rdiff -r1.80 -r1.81 syssrc/sys/ufs/ufs/ufs_vnops.c
cvs rdiff -r1.6 -r1.7 syssrc/sys/uvm/Makefile
cvs rdiff -r1.30 -r1.31 syssrc/sys/uvm/uvm.h syssrc/sys/uvm/uvm_page.h
cvs rdiff -r1.33 -r1.34 syssrc/sys/uvm/uvm_amap.c
cvs rdiff -r1.17 -r1.18 syssrc/sys/uvm/uvm_anon.c syssrc/sys/uvm/uvm_bio.c \
syssrc/sys/uvm/uvm_pglist.c
cvs rdiff -r1.45 -r1.46 syssrc/sys/uvm/uvm_aobj.c
cvs rdiff -r1.10 -r1.11 syssrc/sys/uvm/uvm_aobj.h
cvs rdiff -r1.37 -r1.38 syssrc/sys/uvm/uvm_device.c
cvs rdiff -r1.66 -r1.67 syssrc/sys/uvm/uvm_extern.h syssrc/sys/uvm/uvm_page.c
cvs rdiff -r1.68 -r1.69 syssrc/sys/uvm/uvm_fault.c
cvs rdiff -r1.14 -r1.15 syssrc/sys/uvm/uvm_fault_i.h
cvs rdiff -r1.51 -r1.52 syssrc/sys/uvm/uvm_glue.c syssrc/sys/uvm/uvm_km.c \
syssrc/sys/uvm/uvm_vnode.c
cvs rdiff -r1.15 -r1.16 syssrc/sys/uvm/uvm_io.c
cvs rdiff -r1.9 -r1.10 syssrc/sys/uvm/uvm_km.h
cvs rdiff -r1.31 -r1.32 syssrc/sys/uvm/uvm_loan.c
cvs rdiff -r1.105 -r1.106 syssrc/sys/uvm/uvm_map.c
cvs rdiff -r1.55 -r1.56 syssrc/sys/uvm/uvm_mmap.c
cvs rdiff -r1.12 -r1.13 syssrc/sys/uvm/uvm_object.h
cvs rdiff -r1.19 -r1.20 syssrc/sys/uvm/uvm_page_i.h syssrc/sys/uvm/uvm_stat.c
cvs rdiff -r1.49 -r1.50 syssrc/sys/uvm/uvm_pager.c
cvs rdiff -r1.23 -r1.24 syssrc/sys/uvm/uvm_pager.h
cvs rdiff -r1.36 -r1.37 syssrc/sys/uvm/uvm_pdaemon.c
cvs rdiff -r1.53 -r1.54 syssrc/sys/uvm/uvm_swap.c
cvs rdiff -r1.10 -r0 syssrc/sys/uvm/uvm_vnode.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.